package com.qeado.site.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qeado.site.dao.SiteBasicInfoManageDao;
import com.qeado.site.model.SiteBasicInfo;
import com.qeado.site.service.SiteBasicInfoManageService;

@Service
public class SiteBasicInfoServiceImpl implements SiteBasicInfoManageService {

	@Autowired
	private SiteBasicInfoManageDao siteBasicInfoManageDao;
	
	public SiteBasicInfo getSiteBasicInfo() {
		return this.siteBasicInfoManageDao.getSiteBasicInfo();
	}

	public void saveSiteBasicInfo(SiteBasicInfo siteBasicInfo) {
		SiteBasicInfo temp = this.getSiteBasicInfo();
		if(temp==null){
			//insert
			this.siteBasicInfoManageDao.insertSiteBasicInfo(siteBasicInfo);
		}
		else{
			//update
			this.siteBasicInfoManageDao.updateSiteBasicInfo(siteBasicInfo);		
		}
		
	}

}
